1. Technical Field
The invention disclosed broadly relates to data processing methods and more particularly relates to an improved method for deleting a marked portion of a structured document.
2. Background Art
Current editors provide a block delete function which allows a user to delete a marked portion of a document. These delete functions delete ALL of the marked content. If a matched pair of formatting controls or tags are required to provide particular formatting (e.g. -- boldface type) and only one control or tag is included in the mark, the block delete leaves behind an unmatched control. Although this type of deletion is flexible and never fails, it normally causes the document to become invalid (i.e. -- incorrectly formatted or mis-structured).
In an editor which supports structured documents, this same type of unstructured deletion could result in a document whose structure is invalid (i.e. no longer adheres to the defined hierarchy of elements) if only one tag of a matched pair is included in the mark. This result would force the user to manually repair the document structure by inserting the missing tags. This repair is necessary to assure the correct formatting of the document.
In a non-WYSIWYG environment (one in which the structuring tags are displayed), this repair process would be difficult for a user who does not fully understand the document structure and tedious for the more advanced user. In a WYSIWYG environment (one in which the structuring tags are not displayed), repair of the document structure would be difficult for the advanced user and extremely difficult (maybe impossible) for a user who does not understand the structure of the document.
The following terminology is used throughout this disclosure.
SGML Standardized General Markup Language. A markup language consisting of begin and end tags used to prepare structured documents. Refer to International Standards Organization standard 8879-1986 for definition and details. PA0 Element. SGML-defined entity consisting of a begin tag and its content (including an end tag if necessary). PA0 Root Element. The outermost element in a structured document which packages all contents of the document. PA0 Structured Document. A document which has a defined hierarchy of elements such as that defined by SGML. PA0 Mark. A portion of a document, visually altered (i.e. -- highlighted, reverse-videoed) to indicate its selection for processing (e.g. -- moving, copying, deleting, translating to uppercase, etc.). PA0 Beginning of Mark. The document position, closest to the beginning of a document, which defines the starting boundary of a mark. PA0 End of Mark. The document position, closest to the end of a document, which defines the ending boundary of a mark. PA0 Current Document Position. The document position which determines the focal point for an editing operation, usually the location of the cursor. PA0 Source Document. A document which contains the mark. PA0 Target Document. A document which contains the location to which the contents of the mark will be copied. PA0 Target Location. The document position contained in the target document at which the contents of the mark will be inserted. Note that the target location can be contained within the document which contains the mark, but cannot be contained within the mark itself. PA0 WYSIWYG. An acronym for "What you see is what you get." The term refers to the display of edited text in the same form as it will appear when printed.